CLS
OPEN "snap.in" FOR INPUT AS #1
OPEN "snap.out" FOR OUTPUT AS #2

INPUT #1, n, k

IF (k + 1) MOD (2 ^ n) = 0 THEN PRINT #2, "ON" ELSE PRINT #2, "OFF"

CLOSE #1, #2
END

